package ocean.chinacraft.common.world.item.tool;

import ocean.chinacraft.common.config.GroupDefine;
import ocean.chinacraft.common.world.item.tool.base.ModItemTier;
import net.minecraft.entity.LivingEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.SwordItem;

import javax.annotation.Nonnull;

/**
 * 炎龙巨刀
 *
 * @author zhang
 * @since 2021/12/3
 */
public class DragonGiantKnife extends SwordItem {

    public DragonGiantKnife() {
        super(ModItemTier.YAN_LONG_BIG_KNIFE, 3, -2.4F, new Item.Properties()
                .tab(GroupDefine.CHINACRAFT_TOOL).stacksTo(1));
    }

    @Override
    public boolean hurtEnemy(@Nonnull ItemStack stack, @Nonnull LivingEntity target, @Nonnull LivingEntity livingEntity) {
        super.hurtEnemy(stack, target, livingEntity);
        target.setRemainingFireTicks(20);
        return true;
    }
}
